<!--
  ~ This program is part of the OpenLMIS logistics management information system platform software.
  ~ Copyright © 2013 VillageReach
  ~
  ~ This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
  ~  
  ~ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more details.
  ~ You should have received a copy of the GNU Affero General Public License along with this program.  If not, see http://www.gnu.org/licenses.  For additional information contact info@OpenLMIS.org. 
  -->

<div class="total-cost-container">
    <div class="cost-values">
    <span ng-show="rnr.program.budgetingApplies && !rnr.emergency && rnr.costExceedsBudget && rnr.allocatedBudget"
          class="budget-exceeds-detailed">
      <strong>
          <span class="icon-warning-sign budget-exceeded-icon"></span>
          <span id="budgetWarningExtra" openlmis-message="msg.cost.exceeds.budget"></span>
      </strong>
    </span>
        <strong ng-show="rnr.program.budgetingApplies && !rnr.emergency">
            <span id="allocatedBudgetLabel" openlmis-message="label.allocated.budget"></span><span>:</span>
          <span openlmis-message="label.currency.symbol"></span>
          <span id="allocatedBudgetAmount" class="cell-text" ng-bind="rnr.allocatedBudget | currency: ''"
                ng-show="rnr.allocatedBudget"></span>
          <span id="allocatedBudgetNotApplicable" class="cell-text" openlmis-message="msg.budget.not.allocated"
                ng-hide="rnr.allocatedBudget"></span>
                &nbsp;|&nbsp;
            </strong>
    <span id="budgetWarningIcon" ng-show="rnr.costExceedsBudget" class="icon-warning-sign budget-exceeded-icon">
      <div class="rnr-form-error warning-popup" id="budgetWarningMessage"
           openlmis-message="msg.cost.exceeds.budget"></div>
    </span>


        <strong>
            <span openlmis-message="label.total.rnr.cost"></span>

      <span id="totalCost" class="cell-text">
          <span openlmis-message="label.currency.symbol"></span>
          <span ng-bind="rnr.calculateTotalLineItemCost() | currency: ''"></span>
      </span>
        </strong>
    <span id="dividedCost" ng-click="showCost=!showCost" class="list-icon-container"
          ng-class="{'is-icon-ul-selected': showCost}">
      <i class="icon-list-ul"></i>
    </span>
        <display-cost show="showCost" full-supply-cost="rnr.fullSupplyItemsSubmittedCost"
                      non-full-supply-cost="rnr.nonFullSupplyItemsSubmittedCost"></display-cost>
    </div>
</div>
